/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.apps.epocket.stripes;

/**
 *
 * @author fikri
 */
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.RedirectResolution;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.UrlBinding;

@UrlBinding("/logout")
public class LogoutActionBean extends BaseActionBean {
    @DefaultHandler
    public Resolution logout() {
        _logout();
        return new RedirectResolution(WelcomeActionBean.class);
//        return new JSP("simple_login.jsp");
    }

    private void _logout() {
        getContext().logout();
        addMessage("loggedOut");
    }
}